import { createApp } from 'vue'
import pinia from '@/stores/index'

import App from './App.vue'
import router from './router'
import '@/assets/main.scss'

const app = createApp(App)

// 登录访问拦截
// import { useUserStore } from '@/stores/index'
// router.beforeEach((to) => {
//   const userStore = useUserStore()
//   if (!userStore.token && to.path !== '/login') return '/login'
// })

app.use(pinia)
app.use(router)

app.mount('#app')
